package com.evil.file.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 文件表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_file")
public class File implements Serializable {

    /**
     * id
     */
    @TableId(value = "file_id", type = IdType.AUTO)
    private Long fileId;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 业务类型(0:其他，1:头像，2:应用)
     */
    @TableField(value = "bus_type")
    private Integer busType;

    /**
     * 文件类型(0:其他, 1:图片, 2:视频,99 文件夹)
     */
    @TableField(value = "file_type")
    private Integer fileType;

    /**
     * 文件名称
     */
    @TableField(value = "file_name")
    private String fileName;

    /**
     * 文件code 唯一标识
     */
    @TableField(value = "file_code")
    private String fileCode;

    /**
     * 文件标题
     */
    @TableField(value = "file_title")
    private String fileTitle;

    /**
     * 文件URL
     */
    @TableField(value = "file_url")
    private String fileUrl;

    /**
     * 文件PATH
     */
    @TableField(value = "file_path")
    private String filePath;

    /**
     * 文件md5
     */
    @TableField(value = "file_md5")
    private String fileMd5;

    /**
     * 状态(0:禁用, 1:开启)
     */
    @TableField(value = "is_enable")
    private Boolean isEnable;

    /**
     * 归属人
     */
    @TableField(value = "belong_id")
    private Long belongId;

    /**
     * 服务商 1-本地 2-阿里云
     */
    @TableField(value = "service_provider")
    private Integer serviceProvider;

    /**
     * 文件大小，单位：字节
     */
    @TableField(value = "`size`")
    private Long size;

    /**
     * 文件后缀
     */
    @TableField(value = "extension")
    private String extension;

    /**
     * 是否已删除(0:否, 1:是)
     */
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 修改操作人
     */
    @TableField(value = "modifier_id")
    private Long modifierId;

    /**
     * 修改操作人名字
     */
    @TableField(value = "modifier_name")
    private String modifierName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;

    public static final String COL_FILE_ID = "file_id";

    public static final String COL_ENTERPRISE_ID = "enterprise_id";

    public static final String COL_BUS_TYPE = "bus_type";

    public static final String COL_FILE_TYPE = "file_type";

    public static final String COL_FILE_NAME = "file_name";

    public static final String COL_FILE_CODE = "file_code";

    public static final String COL_FILE_TITLE = "file_title";

    public static final String COL_FILE_URL = "file_url";

    public static final String COL_FILE_PATH = "file_path";

    public static final String COL_FILE_MD5 = "file_md5";

    public static final String COL_IS_ENABLE = "is_enable";

    public static final String COL_BELONG_ID = "belong_id";

    public static final String COL_SERVICE_PROVIDER = "service_provider";

    public static final String COL_SIZE = "size";

    public static final String COL_EXTENSION = "extension";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_MODIFIER_ID = "modifier_id";

    public static final String COL_MODIFIER_NAME = "modifier_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}